home *** CD-ROM | disk | FTP | other *** search
/ The Very Best of Atari Inside / The Very Best of Atari Inside 1.iso / mint / mntinc20 / ostruct.h < prev    next >
C/C++ Source or Header  |  1992-05-15  |  5KB  |  164 lines

  1. #ifndef _OSTRUCT_H
  2. #define _OSTRUCT_H
  3.  
  4. #ifndef _COMPILER_H
  5. #include <compiler.h>
  6. #endif
  7.  
  8. #ifdef __cplusplus
  9. extern "C" {
  10. #endif
  11.  
  12. /*
  13.  * General OS specific codes here
  14.  *
  15.  */
  16.  
  17. /*
  18.  * GEMDOS defines and structures
  19.  */
  20.  
  21. /* Structure used by Dfree() */
  22. typedef struct {
  23.     long b_free;    /* number of free clusters */
  24.     long b_total;    /* total number of clusters */
  25.     long b_secsiz;    /* number of bytes per sector */
  26.     long b_clsiz;    /* number of sectors per cluster */
  27. } _DISKINFO;
  28.  
  29. /* Structure returned by Fdatime() */
  30. typedef struct {
  31.   short time;
  32.   short date;
  33. } _DOSTIME;
  34.  
  35. /* Structure used by Fgetdta(), Fsetdta(), Fsfirst(), Fsnext() */
  36. typedef struct _dta {
  37.     char         dta_buf[21];    /* reserved */
  38.     char            dta_attribute;    /* file attribute */
  39.     unsigned short  dta_time;        /* file time stamp */
  40.     unsigned short  dta_date;        /* file date stamp */
  41.     long            dta_size;        /* file size */
  42.     char            dta_name[14];    /* file name */
  43. } _DTA;
  44.  
  45. /* Codes used with Fsfirst() */
  46.  
  47. #define        FA_RDONLY           0x01
  48. #define        FA_HIDDEN           0x02
  49. #define        FA_SYSTEM           0x04
  50. #define        FA_LABEL            0x08
  51. #define        FA_DIR              0x10
  52. #define        FA_CHANGED          0x20
  53.  
  54. /* Codes used with Pexec */
  55.  
  56. #define        PE_LOADGO           0           /* load & go */
  57. #define        PE_LOAD             3           /* just load */
  58. #define        PE_GO               4           /* just go */
  59. #define        PE_CBASEPAGE        5           /* just create basepage */
  60. /* Tos 1.4: like 4, but memory ownership changed to child, and freed
  61.    on exit
  62.  */
  63. #define        PE_GO_FREE          6           /* just go, then free */
  64.  
  65. #ifdef __MINT__
  66. /* ers: what exactly does mode 7 do ??? */
  67. #  define    PE_ASYNC_LOADGO       100           /* load and asynchronously go */
  68. #  define       PE_ASYNC_GO       104           /* asynchronously go         */
  69. #  define       PE_ASYNC_GO_FREE   106           /* asynchronously go and free */
  70. #  define       PE_OVERLAY       200           /* load and overlay         */
  71. #endif
  72.  
  73. /*
  74.  * BIOS defines and structures
  75.  */
  76.  
  77. /* Device codes for Bconin(), Bconout(), Bcostat(), Bconstat() */
  78. #define _PRT    0
  79. #define _AUX    1
  80. #define _CON    2
  81. #define _MIDI   3
  82. #define _IKBD   4
  83. #define _RAWCON 5
  84.  
  85. /* Structure returned by Getbpb() */
  86. typedef struct {
  87.   short recsiz;         /* bytes per sector */
  88.   short clsiz;          /* sectors per cluster */
  89.   short clsizb;         /* bytes per cluster */
  90.   short rdlen;          /* root directory size */
  91.   short fsiz;           /* size of file allocation table */
  92.   short fatrec;         /* startsector of second FAT */
  93.   short datrec;         /* first data sector */
  94.   short numcl;          /* total number of clusters */
  95.   short bflags;         /* some flags */
  96. } _BPB;
  97.  
  98. /* Structures used by Getmpb() */
  99.  
  100. /* Memory descriptor */
  101. typedef struct _md {
  102.     struct _md    *md_next;    /* next descriptor in the chain */
  103.     long     md_start;    /* starting address of block */
  104.     long     md_length;    /* length of the block */
  105.     long     md_owner;    /* owner's process descriptor */
  106. } _MD;
  107.  
  108. /* Memory parameter block */
  109. typedef struct {
  110.     _MD *mp_free;        /* free memory chunks */
  111.     _MD *mp_used;        /* used memory descriptors */
  112.     _MD *mp_rover;        /* rover memory descriptor */
  113. } _MPB;
  114.  
  115.  
  116. /*
  117.  * XBIOS defines and structures
  118.  */
  119.  
  120. /* Codes used with Cursconf() */
  121. #define CURS_HIDE       0
  122. #define CURS_SHOW       1
  123. #define CURS_BLINK      2
  124. #define CURS_NOBLINK    3
  125. #define CURS_SETRATE    4
  126. #define CURS_GETRATE    5
  127.  
  128. /* Structure returned by Iorec() */
  129. typedef struct {
  130.     char    *ibuf;
  131.     short   ibufsiz;
  132.     short   ibufhd;
  133.     short   ibuftl;
  134.     short   ibuflow;
  135.     short   ibufhi;
  136. } _IOREC;
  137.  
  138. /* Structure returned by Kbdvbase() */
  139. typedef struct {
  140.     void    (*midivec)    __PROTO((void));
  141.     void    (*vkbderr)    __PROTO((void));
  142.     void    (*vmiderr)    __PROTO((void));
  143.     void    (*statvec)    __PROTO((void *));
  144.     void    (*mousevec)    __PROTO((void *));
  145.     void    (*clockvec)    __PROTO((void *));
  146.     void    (*joyvec)    __PROTO((void *));
  147.     long    (*midisys)    __PROTO((void));
  148.     long    (*ikbdsys)    __PROTO((void));
  149.     char    kbstate;
  150. } _KBDVECS;
  151.  
  152. /* Structure returned by Keytbl() */
  153. typedef struct {
  154.     void *unshift;    /* pointer to unshifted keys */
  155.     void *shift;    /* pointer to shifted keys */
  156.     void *caps;        /* pointer to capslock keys */
  157. } _KEYTAB;
  158.  
  159. #ifdef __cplusplus
  160. }
  161. #endif
  162.  
  163. #endif /* _OSTRUCT_H */
  164.